<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="Loginservlet" method="post" name="fm" id="fm2"> <!-- get:地址栏显示请求参数信息，post不显示 -->
用户名:<input type="text" name="userName" id="userName"/> <br/>
密码:<input type="password" name="pwd" id="pwd"/> <br/>
<input type="submit" value="提交" id="but"/>
<a href="javascript:handle()">点击</a>
</form>

</body>
<script type="text/javascript">
 function handle(){
	 var userName=document.getElementById("userName").value;
	 var pwd=document.getElementById("pwd").value;
	 //JS超链接连接到某一个url
	 document.location.href="Loginservlet?userName="+userName+"&pwd="+pwd;
 }


</script>


</html>